load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "api_converter.go",
        "auth_server.go",
        "experiment_server.go",
        "job_server.go",
        "list_request_util.go",
        "pipeline_server.go",
        "pipeline_upload_server.go",
        "report_server.go",
        "run_metric_util.go",
        "run_server.go",
        "test_util.go",
        "util.go",
        "visualization_server.go",
    ],
    importpath = "github.com/kubeflow/pipelines/backend/src/apiserver/server",
    visibility = ["//visibility:public"],
    deps = [
        "//backend/api:go_default_library",
        "//backend/src/apiserver/client:go_default_library",
        "//backend/src/apiserver/common:go_default_library",
        "//backend/src/apiserver/list:go_default_library",
        "//backend/src/apiserver/model:go_default_library",
        "//backend/src/apiserver/resource:go_default_library",
        "//backend/src/common/util:go_default_library",
        "//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
        "@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
        "@com_github_golang_glog//:go_default_library",
        "@com_github_golang_protobuf//jsonpb:go_default_library_gen",
        "@com_github_pkg_errors//:go_default_library",
        "@com_github_robfig_cron//:go_default_library",
        "@com_github_spf13_viper//:go_default_library",
        "@com_github_stretchr_testify//assert:go_default_library",
        "@io_bazel_rules_go//proto/wkt:empty_go_proto",
        "@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@org_golang_google_grpc//codes:go_default_library",
        "@org_golang_google_grpc//metadata:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "api_converter_test.go",
        "auth_server_test.go",
        "experiment_server_test.go",
        "job_server_test.go",
        "list_request_util_test.go",
        "pipeline_server_test.go",
        "pipeline_upload_server_test.go",
        "report_server_test.go",
        "run_metric_util_test.go",
        "run_server_test.go",
        "util_test.go",
        "visualization_server_test.go",
    ],
    data = glob(["test/**/*"]),  # keep
    embed = [":go_default_library"],
    deps = [
        "//backend/api:go_default_library",
        "//backend/src/apiserver/client:go_default_library",
        "//backend/src/apiserver/common:go_default_library",
        "//backend/src/apiserver/list:go_default_library",
        "//backend/src/apiserver/model:go_default_library",
        "//backend/src/apiserver/resource:go_default_library",
        "//backend/src/common/util:go_default_library",
        "//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
        "@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
        "@com_github_google_go_cmp//cmp:go_default_library",
        "@com_github_spf13_viper//:go_default_library",
        "@com_github_stretchr_testify//assert:go_default_library",
        "@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/types:go_default_library",
        "@org_golang_google_grpc//codes:go_default_library",
        "@org_golang_google_grpc//metadata:go_default_library",
    ],
)
